﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace HarveyNash.RefactoringAndCodeSmell.Refactoring.RenameMethod
{
    class Before
    {
        public DataSet GetDs(string connectionString, string sql)
        {
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                connection.Open();                
                SqlDataAdapter dataAdapter = new SqlDataAdapter(new SqlCommand(sql, connection));
                DataSet dataSet = new DataSet();
                dataAdapter.Fill(dataSet);
                return dataSet;
            }
        }
    }
}
